import React, { Component } from 'react';

import './index.scss';

export default class ListTitle extends Component {
    render () {
      const { title, onRefreshData, refreshHide } = this.props;
        return (
            <div className="list-title">
              <h2 className="tltle" >{ title }</h2>
              <span 
               className={['refresh-btn', refreshHide ? 'hide': ''].join(' ')}
               onClick = { () => onRefreshData() }
               >
                <i className="iconfont icon-refresh"></i>
                  刷新数据
              </span>
            </div>
        )
    }
}